The Movie Toolbox allows your application to perform custom processing whenever one of your movies covers a screen region or reveals a region that was previously covered. You perform this processing using cover functions.
There are two types of cover functions: those that are called when your movie covers a screen region, and those that are called when your movie uncovers a screen region, revealing a region that was previously covered. You can use a cover function to detect when a movie changes size.
Cover functions that are called when your movie covers a screen region are responsible for erasing the region--you may choose to save the hidden region in an offscreen buffer. Cover functions that are called when your movie reveals a hidden screen region must redisplay the hidden region.
The Movie Toolbox sets the graphics world before it calls your cover function. Your function must not change the graphics world.
The Movie Toolbox provides default cover functions. When your movie uncovers a region, the default function that is called erases the movie's image by displaying the graphics port's background color and pattern. You can set the port's characteristics by calling the SetMovieGWorld function (described on SetMovieGWorld ). When your movie covers a region, the default function that is called does nothing.
Use the SetMovieCoverProcs function (described on SetMovieCoverProcs ) to set both types of cover functions.
Your cover functions should support the following interface:
pascal OSErr MyCoverProc (Movie theMovie, RgnHandle changedRgn,
long refcon);